package com.yonyou.iuap.ipaas.connector.sdwcoatencent.internal.operation;

import cn.hutool.json.JSONUtil;
import com.yonyou.iuap.ipaas.connector.sdk.api.model.ResponseAttributes;

import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.common.PageableData;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.common.UrlConstant;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.request.stock.InboundListQueryRequest;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.request.stock.OutboundListQueryRequest;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.response.stock.InboundListQueryResponse;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.api.model.response.stock.OutboundListQueryResponse;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.internal.LxwcoatencentConnection;
import com.yonyou.iuap.ipaas.connector.sdwcoatencent.internal.exception.ExecuteErrorsProvider;
import com.yonyou.yonlinker.ysb.runtime.extension.api.annotation.error.Throws;
import com.yonyou.yonlinker.ysb.runtime.extension.api.annotation.param.Connection;
import com.yonyou.yonlinker.ysb.runtime.extension.api.annotation.param.Content;
import com.yonyou.yonlinker.ysb.runtime.extension.api.annotation.param.MediaType;
import com.yonyou.yonlinker.ysb.runtime.extension.api.runtime.operation.Result;

/**
 * 库存操作类 */
@Throws(ExecuteErrorsProvider.class)
public class StockOperations {
    /**
     * 调拨入库单列表查询
     * @Title: lxDbRk_bipQtRk
     * @Description: TODO LX调拨入库——>bip其他入库
     * @Author: zs
     */
    @MediaType(strict = false,value = "application/json")
        public Result<String, ResponseAttributes> queryRequisitionStockInList(@Connection LxwcoatencentConnection connection , @Content InboundListQueryRequest queryRequisitionStockInReq) {
        // 待开发操作代码块
        PageableData<InboundListQueryResponse> result = connection.doQuery(UrlConstant.INBOUND_QUERY_URL, JSONUtil.parseObj(queryRequisitionStockInReq));
        return connection.returnCommonResult("queryRequisitionStockInList", result);
    }

    /**
     *调拨出库单列表查询
     * @Title: lxDbCk_bipQtCk
     * @Description: TODO LX调拨出库——>bip其他出库
     * @Author: zs
     */
    @MediaType(strict = false,value = "application/json")
    public Result<String, ResponseAttributes> queryRequisitionStockOutList(@Connection LxwcoatencentConnection connection , @Content OutboundListQueryRequest queryRequisitionStockOutReq) {
        // 待开发操作代码块
        PageableData<OutboundListQueryResponse> result = connection.doQuery(UrlConstant.QUERY_OUTBOUND_LIST, JSONUtil.parseObj(queryRequisitionStockOutReq));
        return connection.returnCommonResult("queryRequisitionStockOutList", result);
    }


    /**
     *其他出库单列表查询
     * @Title: lxQtCk_bipQtCk
     * @Description: TODO LX其他出库——>bip其他出库
     * @Author: zs
     */
    @MediaType(strict = false,value = "application/json")
    public Result<String, ResponseAttributes> queryOrderStockOutList(@Connection LxwcoatencentConnection connection , @Content OutboundListQueryRequest queryOrderStockOutReq) {
        // 待开发操作代码块
        PageableData<OutboundListQueryResponse> result = connection.doQuery(UrlConstant.QUERY_OUTBOUND_LIST, JSONUtil.parseObj(queryOrderStockOutReq));
        return connection.returnCommonResult("queryOrderStockOutList", result);
    }
    /**
     * 其他入库单列表查询
     * @Title: lxQtRk_bipQtRk
     * @Description: TODO LX其他入库——>bip其他入库
     * @Author: zs
     */
    @MediaType(strict = false,value = "application/json")
    public Result<String, ResponseAttributes> queryOrderStockInList(@Connection LxwcoatencentConnection connection , @Content InboundListQueryRequest queryOrderStockInReq) {
        // 待开发操作代码块
        PageableData<InboundListQueryResponse> result = connection.doQuery(UrlConstant.QUERY_OUTBOUND_LIST, JSONUtil.parseObj(queryOrderStockInReq));
        return connection.returnCommonResult("queryOrderStockInList", result);
    }

}
